package cn.anquing.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegExUtil {

	/**   
	* @Title: matcher   
	* @Description:
	* @param regExStr 正则字符串
	* @param arg 要匹配的字符串
	* @return   
	*/ 
	public static boolean matcher(String regExStr,String arg){
				
		Pattern pattern = Pattern.compile(regExStr);
	    Matcher matcher = pattern.matcher(arg);
	    // 字符串是否与正则表达式相匹配
	    boolean rs = matcher.matches();	    
	    
		return rs;
	}
	
}
